<h1>New timeline</h1>

<% if flash[:notice] -%>

      <div class="message"><fb:success message="<%= flash[:notice]%>" /></div>
 <% end -%>

<% facebook_form_for(:timeline,@timeline,:url => ".") do |f| %>
  <% if f.error_messages.length > 0 -%>
    
    <div class="errors">  <%= f.error_messages %> </div>
     
 <% end -%>

                     <table>
                        <tbody>
                            <tr class="prop">

                                <td valign="top" class="<%= @timeline.errors.invalid?(:title)? "errors" : "input" %>">
                                    <%= f.text_field :title %>

                                </td>
                            </tr>
                            <tr class="prop">
                                <td valign="top"  class="<%= @timeline.errors.invalid?(:title)? "errors" : "input" %>">
                                      <%= f.text_area :description %>
                                </td>
                            </tr>
                            <tr class="prop">
                                
                                <td valign="top" >
                                     <%=   f.select :unit_type,  Timeline::TYPES   %>
                                </td>
                            </tr>
                            <tr class="prop">
                                <td valign="top"  >
                                     <%=   f.select :detail_unit,  Timeline::UNITS,  :prompt => "Select the minor unit"   %>
                                </td>
                            </tr>
                            <tr class="prop">
                                 <td valign="top"  >
                                    <%= f.text_field :detail_pixels %>
                                </td>
                            </tr>
                            <tr class="prop">
                                <td valign="top"  >

                                  <%=   f.select :overview_unit,  Timeline::UNITS,  :prompt => "Select a major unit"   %>

                                </td>
                            </tr>
                            <tr class="prop">
                                   <td valign="top" >
                                    <%= f.text_field :overview_pixels %>
                                </td>
                            </tr>
                        </tbody>
                    </table>
               <%= f.buttons "Save Timeline" %>




<% end %>

      
